home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
014
/
undoback.arc
/
UNDOBACK.BAS
Wrap
BASIC Source File
|
1986-10-22
|
2KB
|
41 lines
10 'UNDOBACK.BAS UNDO FILES FROM HARD DISK BACKUP COMMAND
20 KEY OFF:CLS:COLOR 0,7
30 LOCATE 5,33:PRINT " UNDOBACK.BAS "
40 LOCATE 7,31:PRINT " By Rich Schinnell ":COLOR 7,0:PRINT:PRINT
50 PRINT "A program for IBM DOS 2.0/2.1
60 PRINT "Fixed Disk owners, ie XT's and expansion chassis's"
70 PRINT "who use the IBM BACKUP utility on the DOS diskette
80 PRINT "and want to access files from their backup disks without
90 PRINT "doing a recover. The only exception: is a file which was saved part
100 PRINT "on one disk and part on another.. Sorry about that case ........
110 PRINT "Maybe some sharper programmer can modify this program to check that"
120 PRINT "Press <ENTER> to quit enter ? for dir (eg..?B:*.* )"
130 DEFINT A-Z:FALSE=0:TRUE=NOT FALSE:ON ERROR GOTO 370
140 PRINT:PRINT:INPUT "What is input file name ";INFILE$
150 IF LEN(INFILE$)<1 THEN 360
160 IF LEFT$(INFILE$,1)="?" THEN FILES MID$(INFILE$,2):GOTO 140
170 OPEN INFILE$ FOR INPUT AS #1:CLOSE 1
180 OPEN INFILE$ AS #1 LEN=1
190 FIELD #1,1 AS A$
200 A#=LOF(1):PRINT "Input file has";A#;" Bytes in it"
210 FOR I=1 TO 128:GET #1:C$=C$+A$:NEXT I
220 FOR I=1 TO 128:IF ASC(MID$(C$,I,1))<33 THEN 240
230 D$=D$+MID$(C$,I,1)
240 NEXT I
250 PRINT MID$(D$,1,40);" is the file name when backed up"
260 INPUT "What is output file name ";OUTFILE$
270 OPEN OUTFILE$ FOR INPUT AS #2:CLOSE 2
280 PRINT "File ";OUTFILE$;" already exists, <O>ovewrite ":INPUT ": ";WELL$:IF WELL$="O" OR WELL$="o" THEN 290 ELSE 260
290 CLOSE #2:OPEN OUTFILE$ FOR OUTPUT AS #2:CLOSE #2:OPEN OUTFILE$ AS #2 LEN=1
300 FIELD #2,1 AS B$
310 FOR I!=129 TO A#
320 GET #1,I!:LSET B$=A$
330 PUT #2:IF (I! MOD 50)=0 THEN PRINT CHR$(15);
340 NEXT I!
350 CLOSE:PRINT:PRINT "File ";OUTFILE$;" Successfully created "
360 KEY ON:END
370 IF ERL=170 THEN PRINT "file not found try again ":RESUME 140
380 IF ERL=270 THEN RESUME 290
390 IF ERL=330 THEN PRINT "disk is full or something wrong someplace, check":RESUME 360
400 PRINT "Error";ERR;" has occured in line #";ERL:RESUME 360